﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Nuzzle.Protocol.Types.Game.Character.Alignment
{
    public class ActorAlignmentInformations
    {
        public byte AlignmentSide { get; set; }
        public byte AlignmentValue { get; set; }
        public byte AlignmentGrade { get; set; }
        public short Deshonor { get; set; }
        public int CharacterPower { get; set; }

        public ActorAlignmentInformations(byte alignmentSide, byte alignmentValue, byte alignmentGrade, short deshonor, int characterPower)
        {
            this.AlignmentSide = alignmentSide;
            this.AlignmentValue = alignmentValue;
            this.AlignmentGrade = alignmentGrade;
            this.Deshonor = deshonor;
            this.CharacterPower = characterPower;
        }

        public void Serialize(NetworkMessage message)
        {
            message.WriterBuffer.writeByte(this.AlignmentSide);
            message.WriterBuffer.writeByte(this.AlignmentValue);
            message.WriterBuffer.writeByte(this.AlignmentGrade);
            message.WriterBuffer.writeShort(this.Deshonor);
            message.WriterBuffer.writeInt(this.CharacterPower);
        }
    }
}
